﻿using Corina.Cydee.Apphub.Viewmodels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Corina.Cydee.Apphub
{
    public partial class LoginView : ChildWindow
    {
        LoginViewmodel viewmodel;
        public LoginView()
        {
            InitializeComponent();
            viewmodel = (LoginViewmodel)DataContext;
            viewmodel.LoginSucceed += viewmodel_LoginSucceed;
        }

        private void viewmodel_LoginSucceed(object sender, Events.LoginResultArgs e)
        {
            this.DialogResult = true;
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }
    }
}

